package com.macro.mall.portal.thread;

import com.macro.mall.common.thread.TaskToolExecutor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author wwj
 */
@Configuration
public class ThreadPoolConfig {

    @Bean(initMethod = "init", destroyMethod = "destroy")
    public TaskToolExecutor testTaskToolExecutor(){
        TaskToolExecutor testExecutor = new TaskToolExecutor();
        testExecutor.setName("testExecutor");
        testExecutor.setCoreSize(15);
        testExecutor.setMaxSize(32);
        testExecutor.setQueueSize(1024);
        return testExecutor;
    }
}
